<template>
	<view>
		<stop isBack>
			<view slot="content">创建活动</view>
		</stop>
		<view class="mart3">
			<stab :names="['基本信息','选择活动人员','选择参与部门']" v-model="myCurTab"></stab>
		</view>
		<view v-show="myCurTab==0">
			<view class="bcf pad2 mart3">
				<view class="list-style-1">基本信息</view>
			</view>
			<view class="mart3">
				<stext label="活动标题" placeholder="请输入活动标题" v-model="en.name"></stext>
			</view>
			<view class="mart3">
				<sentity label="活动类型" placeholder="请选择" v-model="en.type" model="CimingActivityType"></sentity>
			</view>
			<view class="mart3">
				<sdatetime label="开始时间" placeholder="请设置开始时间" v-model="en.startAt"></sdatetime>
			</view>
			<view class="mart3">
				<sdatetime label="结束时间" placeholder="请设置结束时间" v-model="en.endAt"></sdatetime>
			</view>
			<view class="mart3">
				<stext label="地址位置" placeholder="请输入地址位置" v-model="en.address"></stext>
			</view>
			<view class="mart3">
				<stext label="预估用时" placeholder="请输入预估用时" v-model="en.time"></stext>
			</view>
			<view class="mart3">
				<stext label="预估费用" placeholder="请输入预估费用" v-model="en.money"></stext>
			</view>
			<view class="mart3">
				<stextarea label="活动介绍" placeholder="介绍活动内容" v-model="en.intro"></stextarea>
			</view>
		</view>
		<view v-show="myCurTab==1">
			<view class="mart3 bcf pad2">
				<view class="list-style-1">选择人员</view>
				<view class="mart3 padb10">
					<user-selector v-model="en.users"></user-selector>
				</view>
			</view>
		</view>
		<view v-show="myCurTab==2">
			<view class="mart3 bcf pad2">
				<view class="list-style-1">
					选择部门
				</view>
				<view class="mar3 pad2 bg-orange light round fs10">选择部门并保存后，部门内全部人员均会被选中。</view>
				<view class="mart3 padb10">
					<department-selector v-model="en.departments"></department-selector>
				</view>
			</view>
		</view>
		
		<view class="pad10 tac">&nbsp;</view>
		<view class="mart3 pos-f b0 l0 r0 bcf pad2">
			<ssubmit model="cimingActivitys" v-model="en"></ssubmit>
		</view>
	</view>
</template>

<script>
	import UserSelector from '../../../templete/ciming/users_selecter.vue'
	import DepartmentSelector from '../../../templete/ciming/departments_selecter.vue'
	export default {
		components:{UserSelector,DepartmentSelector},
		data() {
			return {
				en:{
					bookAt:'',
					name:'',
					type:'',
					startAt:'',
					endAt:'',
					address:'',
					time:'',
					money:'',
					intro:'',
					users:[],
					departments:[]
				}
			}
		},
		methods: {
			
		},
		watch:{
		}
	}
</script>

<style>

</style>
